package org.example.factory;

import org.example.client.TestOpenFeignClient;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class TestClientFactory implements FallbackFactory<TestOpenFeignClient> {
    @Override
    public TestOpenFeignClient create(Throwable cause) {
        return new TestOpenFeignClient() {

            @Override
            public String test() {
                return "ERROR";
            }

            @Override
            public String testOpenFeign() {
                return "ERROR";
            }
        };
    }
}
